var express = require('express')
var Router = express.Router()

var OperationOfDatabase=require('../databaseManage/OperationOfDatabase')
var db=new OperationOfDatabase();

 
Router.post('/', function (req, res) {
   //var data=JSON.parse(req.query[0])
   // console.log(req.body);
   var post_title=req.body.post_title;
   var comment=req.body.post_comment;
   var comment_user=req.body.user_name;
   var add_time=req.body.add_time;
   db.addNewComment(post_title,add_time,comment_user,comment,res);
   // res.send('<h1>服务器端响应了register功能</h1>')
})
module.exports = Router;